package com.xebia.eshop.beans.books;

import org.apache.commons.lang3.StringUtils;

public class Book {
	private String isbn;
	private String title;
	private String price;
	private String cover;
	public String getIsbn() {
		return isbn;
	}
	public void setIsbn(String isbn) {
		this.isbn = isbn;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getCover() {
		return cover;
	}
	public void setCover(String cover) {
		this.cover = cover;
	}
	@Override
	public boolean equals(Object obj) {
		boolean equals = false;
		if (obj instanceof Book) {
			Book book = (Book)obj;
			equals = StringUtils.equals(this.isbn, book.isbn);
		}
		return equals;
	}
	@Override
	public int hashCode() {
		return this.isbn.hashCode();
	}
}
